pp108 : Associating Existing Models

Associating Existing Models

This topic describes the procedure to associate existing models in an XForm.

Before you begin this task:
You can associate the models in an XForm if it contains more than one model.

The models in an XForm are the components that hold and manage data. A model manages data requests, stores the response data, and synchronizes the changes made to the data with the backend.
If multiple models in an XForm are interdependent for data inputs such that the values from one are used as the input for another, you can associate the models.
In XForms with associated models, when you specify a value as the input for a field, the application will automatically retrieve and display other related information. This is possible as, at the backend, the models in the XForm are associated using common parameters that enable the exchange of data, and thus define the relationship between the models.

  1. Open the XForm in the XForms Designer.
  2. Add a Web service operation to the XForm. See Creating XForms using Web Services for details. A Web service operation is added to the XForm and the relevant interface is generated.
  3. Click (Manage Models) on the toolbar.

    Note:
    The Manage Models icon ( ) is available only in the advanced toolbar of the XForms Designer. Check Advanced in the toolbar, to view it.

    The Manage Models window appears.
  4. Click . An empty row is added in the Manage Models window and the Model Properties dialog box appears.
  5. Select an option from the Parent Model drop-down list on the Associations tab to specify the model with which the current model is to be associated.

    Restriction

    • It is not possible to associate a model with itself.
    • Models that do not have parameters available for association cannot be associated with other models.
    The parameters available for the selected model are automatically displayed in the Request Parameter column.
  6. For each parameter, click in the Field column to display the Model References dialog box, and select an option to specify the field that is available for association in the current model.
  7. For each parameter, click in the Parent Model Field column to display the Model References dialog box, and select an option to specify the field of the parent model with which to associate.

    Note:
    The Parent Model Field column is editable only if a parent model is specified.

  8. Click OK.
    The details of the associated models are saved.

Related concepts

Model-View-Controller Concept in Process Platform XForms

Related tasks

Creating Models

Related reference

Model Properties dialog box